package common

import (
	"os"
	"syscall"

	//log "ycx-glog"
)

func RecordFatal(file string) {
	logFile, err := os.OpenFile(EnsureFilePath(file), os.O_CREATE|os.O_APPEND|os.O_RDWR, 0660)
	if err != nil {
		return
	}
	syscall.Dup2(int(logFile.Fd()), int(os.Stderr.Fd()))
}
